home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1984 Half 1
/
rerun-1984-01-06-side-b.d64
/
spriten feb p124
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
88 lines
20 rem draw the original borders by typing run
25 rem type goto 200 to save the picture and draw the sprite
30 rem type goto 500 to list the data on the screen
35 rem type goto 600 to redraw and modify the picture
40 rem type goto 700 to list data to the printer
45 dim ar(504),a1(63): v=53248
100 gosub1000
150 end
200 gosub 1200
300 gosub 1300
400 gosub 1400
450 end
500 gosub 1500
510 if p1=1 then print#1 : p1=0 : close 1
550 end
600 gosub 1600
650 end
700 p1=1
710 open 1,4 : cmd 1
720 goto 500
800 rem
1000 rem set up information for borders
1010 print"[147]":poke53281,11
1020 s=1034 : s1=1057 : s2=1 : s3=100 : gosub 1100
1030 s=1073 : s1=1873 : s2=40 : s3=103 : gosub 1100
1040 s=1914 : s1=1937 : s2=1 : s3=99 : gosub1100
1050 s=1098 : s1=1937 : s2=40 : s3=101 : gosub1100
1060 s=1034 : poke s+7,122 : poke s+8,76
1065 poke s+15,122 : poke s+16,76
1070 s=1914 : poke s+7,80 : poke s+8,79
1075 poke s+15,80 : poke s+16,79
1080 s=1472 : poke s,67 : poke s+27,67
1090 return
1100 rem draw borders
1110 for i=s to s1 step s2
1120 : poke i,s3
1130 next i
1140 return
1150 rem
1200 rem put bit data in array ar()
1210 i1=0 : rem i1=zero
1220 for s=1074 to 1874 step 40
1230 : for i=s to s+23
1240 : i1=i1+1
1250 : ar(i1)=0 : rem ar(i1)=zero
1260 : if peek(i)=49 then ar(i1)=1
1270 : next i
1280 next s
1290 return
1295 rem
1300 rem decode & put decimal data in array a1()
1310 y=1
1320 for i=1 to 63
1330 : dec=0 : bin=128 : rem dec=zero
1340 : for ix=y to y+7
1350 : dec=dec+bin*ar(ix)
1360 : bin=bin/2
1370 : next ix
1380 : y=y+8 : a1(i)=dec
1390 next i
1395 return
1397 rem
1400 rem draw the sprite
1410 for i=1 to 63
1420 : poke 831+i,a1(i)
1430 next i
1440 poke v+4,70 : poke v+5,205
1450 poke 2042,13 : poke v+21,4
1460 return
1470 rem
1500 rem list data
1510 print"[147]" : poke v+21,0 : rem poke v+21,zero
1520 for i=1 to 63 step 3
1530 : print a1(i),a1(i+1),a1(i+2)
1540 next i
1550 return
1560 rem
1600 rem redraw picture
1610 poke53281,15:gosub 1000
1620 i1=0 : rem i1=zero
1630 for s=1074 to 1874 step 40
1640 : for i=s to s+23
1650 : i1=i1+1
1660 : if ar(i1)=1 then poke i,49
1670 : next i
1680 next s
1690 return